#ifndef VSESSION_H
#define VSESSION_H

#include <QWidget>
#include "VBaseSplitterForm.h"
#include "CConnectManager.h"
#include "CTableSession.h"

namespace Ui {
class VSession;
}

class VSession : public VBaseSplitterForm
{
    Q_OBJECT

public:
    explicit VSession(QString strId,QWidget *parent = nullptr);
    ~VSession();

    virtual void setFormChecked(bool bIsChecked);
    bool isChecked();
    void showChartSetting(bool bShow);
    QString id();
    QString &name();
    bool setTextCode(QString strTextCode);
signals:
    void textCodeChanged(QString strTextCode);
public slots:
    void saveSession();
    void closeSession();
    void removeSession();
private:
    void init();
    void init(QString strId);
private:
    Ui::VSession *ui;
    bool m_bChecked;
    StSession m_stSession;
    CConnectManager *m_pConnectManager = nullptr;
};

#endif // VSESSION_H
